cc.Class({
    extends: cc.Component,

    properties: {
        
    },

    onLoad: function () {
        //屏蔽底部点击事件
        cc.find('mask', this.node).on(cc.Node.EventType.TOUCH_START, function (event) {});
        
        var setting_node = cc.find("dikuang", this.node);
        setting_node.setPosition(cc.p(0, 2000));
        setting_node.runAction(cc.moveTo(0.5, cc.p(0, 0)).easing(cc.easeQuadraticActionOut()));
    },
    
    //点击确定
    onSure: function () {
        var setting_node = cc.find("dikuang", this.node);
        setting_node.runAction(cc.sequence(
            cc.moveTo(0.5, cc.p(0, -2000)).easing(cc.easeQuadraticActionInOut()),
            cc.callFunc(this.exitThisNode, this)
            ));
    },
    
    //点击关闭
    onClose: function () {
        var setting_node = cc.find("dikuang", this.node);
        setting_node.runAction(cc.sequence(
            cc.moveTo(0.5, cc.p(0, -2000)).easing(cc.easeQuadraticActionInOut()),
            cc.callFunc(this.exitThisNode, this)
            ));
    },
    
    //删除当前节点
    exitThisNode: function () {
        this.node.destroy();
    },
});
